<style lang="css"></style>
<template>
    <div>
        <h2>用户密码</h2>
    </div>
    <div>
        <el-input v-model="newPwd" placeholder="输入新密码" clearable />
    </div>
    <div>
        <el-button type="primary" size="default" @click="changePwd">修改密码</el-button>
    </div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { changePassword } from '../../api/admin'
const newPwd = ref('');

const changePwd = () => {
    changePassword({ password: newPwd.value }).then(data => {
        console.log(data);
    })
}
</script>